from tortoise import fields, models


class TimestampMixin:
    create_time = fields.DatetimeField(auto_now_add=True, null=True)
    update_time = fields.DatetimeField(auto_now=True, null=True)


class BaseModel(models.Model):
    status = fields.CharField(max_length=1)

    class Meta:
        abstract = True


class BaseRelateModel(models.Model):
    class Meta:
        abstract = True
